package com.xiaomaoguai.observer.example.pull;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ConcreteObserver implements Observer {

    private static final Logger LOGGER = LoggerFactory.getLogger(ConcreteObserver.class);

    private String observerState;

    @Override
    public void update(Subject subject) {
        observerState = ((ConcreteSubject) subject).getState();
        LOGGER.info("pull---观察者状态为：{}", observerState);
    }

}
